# 读写json
import json

# 读取json文件中的内容
with open('study.json', 'r', encoding='utf-8') as f:
    data = json.load(f)
print(data)

data = {'id': 4, 'name': '激流勇进', 'damage': '593'}
# 写入数据到json文件中
with open('study.json', 'w', encoding='utf-8') as f:
    json.dump(data, f)